import React, { Component } from 'react';
import { EnvView } from '$router';
import Touchable from '$yo-component/touchable';
import yoHistory from '$common/history';
import './index.scss';

class Footer extends Component {
    render() {
        return (
            <section className="yo-tab yo-tab-view m-tabview my-footer">
                <Touchable touchClass="m-content-active" onTap={() => {
                    yoHistory.push('/home');
                }}>
                {
                    this.props.indexLink==='true' ?
                    <a href="javascrppt:;" className="item item-y-ico item-on">
                        <i className="iconfont y-ico">&#xe646;</i>
                        履历
                    </a>:
                    <a href="javascrppt:;" className="item item-y-ico">
                        <i className="iconfont y-ico">&#xe646;</i>
                        履历
                    </a>
                }
                    
                </Touchable>

                <Touchable touchClass="m-content-active" onTap={() => {
                    yoHistory.push('/skill');
                }}>
                {
                    this.props.indexLink2==='true' ?
                    <a href="javascrppt:;" className="item item-y-ico item-on">
                        <i className="iconfont y-ico">&#xe609;</i>
                        技能
                    </a>:
                    <a href="javascrppt:;" className="item item-y-ico">
                        <i className="iconfont y-ico">&#xe609;</i>
                        技能
                    </a>
                }
                </Touchable>

                <Touchable touchClass="m-content-active" onTap={() => {
                    yoHistory.push('/item');
                }}>
                {
                    this.props.indexLink3==='true' ?
                    <a href="javascrppt:;" className="item item-y-ico item-on">
                        <i className="iconfont y-ico">&#xe61d;</i>
                        项目
                    </a>:
                    <a href="javascrppt:;" className="item item-y-ico">
                        <i className="iconfont y-ico">&#xe61d;</i>
                        项目
                    </a>    
                }
                </Touchable>
                
                <Touchable touchClass="m-content-active" onTap={() => {
                    yoHistory.push('/me');
                }}>
                {
                    this.props.indexLink4==='true' ?
                    <a href="javascrppt:;" className="item item-y-ico item-on">
                        <i className="iconfont y-ico">&#xe60c;</i>
                        我
                    </a>:
                    <a href="javascrppt:;" className="item item-y-ico">
                        <i className="iconfont y-ico">&#xe60c;</i>
                        我
                    </a>
                }
                </Touchable>
                
            </section>
        )
    }
}


Footer.defaultProps = {
    indexLink:"true",
    indexLink2:'false',
    indexLink3:'false',
    indexLink4:'false'
    
}

export default Footer;
